﻿Public Class Vgate2BugZero

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnTransform_Click(sender As Object, e As EventArgs) Handles btnTransform.Click
        Dim arrVgateNo As List(Of String) = Me.GetListVgateNoFromInput()
        Dim oBrowser As New OpenQA.Selenium.Firefox.FirefoxDriver

        Dim biz As New MainConvertBIZ(oBrowser)
        Dim listIssue As List(Of Issue) = biz.GetListIssue(arrVgateNo)
        dgvResult.DataSource = listIssue
        dgvResult.Show()
    End Sub

    Private Function FilterInput(ByVal vsInput As String) As String
        Dim sRet As String = String.Empty
        sRet = vsInput.Replace(vbNewLine, " ")
        Return sRet
    End Function

    Private Function GetListVgateNoFromInput() As List(Of String)
        Dim oRet As New List(Of String)
        Dim sInputFiltered As String = Me.FilterInput(txtInput.Text)
        oRet = sInputFiltered.Split(New Char(-1) {}, StringSplitOptions.RemoveEmptyEntries).ToList
        Return oRet
    End Function
End Class
